{extend name="$_tpl_public_layout_danceadmin"/}


{block name="breadcrumb"}
<ol class="breadcrumb">
	<li class="breadcrumb-item"><a href="{:url('admin/index/index')}">{:config('system.site_title')}</a></li>
	<li class="breadcrumb-item"><a href="{:url('admin/weixinAccount/index')}">{$sideName}</a></li>
</ol>
{/block}


{block name="pageheader"}
{$sideName}
{/block}


{block name="content"}
<div class="card mb-3">
	<div class="card-body">
		<form action="{:url('admin/weixinAccount/doAdd')}" method="post" enctype="multipart/form-data" class="form-horizontal J_ajaxForm">
			<input type="hidden" name="id" value="{$id}" />
			<div class="form-group row">
				<label class="col-sm-2 control-label">公众号名称</label>
				<div class="col-sm-5"><input type="text" name="data[wxname]" value="{$info['wxname']}" class="form-control" /></div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">原始id</label>
				<div class="col-sm-5"><input type="text" name="data[wxid]" value="{$info['wxid']}" class="form-control" /></div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">微信号</label>
				<div class="col-sm-5"><input type="text" name="data[wxnumber]" value="{$info['wxnumber']}" class="form-control" /></div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">微信号类型</label>
				<div class="col-sm-5"><?php echo isOpenRadioHtmlB('data[wxtype]', $info['wxtype']); ?></div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">二维码</label>
				<div class="col-sm-5">
					<div class="daui-filebox J_filebox">
						<input type="file" name="ewmurl" class="daui-filebox__file" />
						<div class="daui-filebox__hd">
							<div class="daui-filebox__control">
								选择文件
							</div>
							<div class="daui-filebox__name"></div>
						</div>
						<div class="daui-filebox__bd">
							<img src="{:config('app.ftp_web')}{$info['ewmurl']}" onerror="Javascript:this.src='/static/danceAdmin/images/nopic.png';" />
						</div>
						<div class="daui-filebox__help">
							请上传二维码，建议尺寸为160*160px(不做压缩处理)
						</div>
					</div>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">AppID</label>
				<div class="col-sm-5"><input type="text" name="data[appid]" value="{$info['appid']}" class="form-control" /></div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">AppSecret</label>
				<div class="col-sm-5"><input type="text" name="data[appsecret]" value="{$info['appsecret']}" class="form-control" /></div>
				<div class="col-sm-5 help-block">仅做"服务器配置"时需要</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">Token</label>
				<div class="col-sm-5"><input type="text" name="data[token]" value="{$info['token']}" class="form-control" /></div>
				<div class="col-sm-5 help-block">仅做"服务器配置"时需要</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">EncodingAESKey</label>
				<div class="col-sm-5"><input type="text" name="data[aeskey]" value="{$info['aeskey']}" class="form-control" /></div>
				<div class="col-sm-5 help-block">仅做"服务器配置"时需要</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">商户号</label>
				<div class="col-sm-5"><input type="text" name="data[mchid]" value="{$info['mchid']}" class="form-control" /></div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">商户支付密钥</label>
				<div class="col-sm-5"><input type="text" name="data[mchkey]" value="{$info['mchkey']}" class="form-control" /></div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">证书序列号</label>
				<div class="col-sm-5"><input type="text" name="data[serial_no]" value="{$info['serial_no']}" class="form-control" /></div>
				<div class="col-sm-5"></div>
			</div>
			<h3 class="form-lighter">商户支付证书(涉及企业付款、企业发红包会用到，微信支付用不到)</h3>
			<div class="form-group row">
				<label class="col-sm-2 control-label">apiclient_cert</label>
				<div class="col-sm-5">
					<textarea name="data[apiclient_cert]" class="form-control" rows="10">{$info['apiclient_cert']}</textarea>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">apiclient_key</label>
				<div class="col-sm-5">
					<textarea name="data[apiclient_key]" class="form-control" rows="10">{$info['apiclient_key']}</textarea>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="clearfix form-actions">
				<div class="offset-md-2 col-sm-10">
					<button type="submit" class="btn btn-primary btn-sm J_ajaxSubmit">保存修改</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}


{block name="script"}
<!-- 上传图片展示 -->
<script type="text/javascript" src="__STATIC__/dancewidgets/uploadPreview/uploadPreview.js"></script>
{/block}